package com.flyco.modules.pms.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.flyco.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.flyco.poi.excel.annotation.Excel;

/**
 * @Description: 商品分类
 * @Author: flyco
 * @Date:   2019-11-15
 * @Version: V1.0
 */
@Data
@TableName("pms_product_category")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="pms_product_category对象", description="商品分类")
public class PmsProductCategory {
    
	/**分类ID*/
	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "分类ID")
	private Long id;
	/**品牌ID*/
	@Excel(name = "品牌ID", width = 15)
	@ApiModelProperty(value = "品牌ID")
	@Dict(dictTable ="pms_brand",dicText = "name",dicCode = "id")
	private Long brandId;
	/**上机分类的编号：0表示一级分类*/
	@Excel(name = "上机分类的编号：0表示一级分类", width = 15)
    @ApiModelProperty(value = "上机分类的编号：0表示一级分类")
	private Long parentId;
	/**名称*/
	@Excel(name = "名称", width = 15)
    @ApiModelProperty(value = "名称")
	private String name;
	/**分类级别：0->1级；1->2级*/
	@Excel(name = "分类级别：0->1级；1->2级", width = 15)
    @ApiModelProperty(value = "分类级别：0->1级；1->2级")
	private Integer level;
	/**商品数量*/
	@Excel(name = "商品数量", width = 15)
    @ApiModelProperty(value = "商品数量")
	private Integer productCount;
	/**商品单位*/
	@Excel(name = "商品单位", width = 15)
    @ApiModelProperty(value = "商品单位")
	private String productUnit;
	/**是否显示在导航栏：0->不显示；1->显示*/
	@Excel(name = "是否显示在导航栏：0->不显示；1->显示", width = 15)
    @ApiModelProperty(value = "是否显示在导航栏：0->不显示；1->显示")
	private String navStatus;
	/**显示状态：0->不显示；1->显示*/
	@Excel(name = "显示状态：0->不显示；1->显示", width = 15)
    @ApiModelProperty(value = "显示状态：0->不显示；1->显示")
	private String showStatus;
	/**排序*/
	@Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
	private Integer sort;
	/**图标*/
	@Excel(name = "图标", width = 15)
    @ApiModelProperty(value = "图标")
	private String icon;
	/**关键字*/
	@Excel(name = "关键字", width = 15)
    @ApiModelProperty(value = "关键字")
	private String keywords;
	/**描述*/
	@Excel(name = "描述", width = 15)
    @ApiModelProperty(value = "描述")
	private Object description;
	/**创建人*/
	@Excel(name = "创建人", width = 15)
    @ApiModelProperty(value = "创建人")
	private String createBy;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private Date createTime;
	/**更新人*/
	@Excel(name = "更新人", width = 15)
    @ApiModelProperty(value = "更新人")
	private String updateBy;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private Date updateTime;
	/**分类广告图片*/
	@Excel(name = "分类广告图片", width = 15)
	@ApiModelProperty(value = "分类广告图片")
	private String picUrl;
	/**微信第三级类目ID*/
	@Excel(name = "微信第三级类目ID", width = 15)
	@ApiModelProperty(value = "微信第三级类目ID")
	private Integer wxCatId;
	/**微信是否需要认证*/
	@Excel(name = "微信是否需要认证", width = 15)
	@ApiModelProperty(value = "微信是否需要认证")
	private Integer wxQualificationFlag;

	/**上级分类名称*/
	@TableField(exist = false)
	private String parentName;

    /**当前分类的子类*/
    @TableField(exist = false)
    private List<PmsProductCategory> children;

}
